package com.smh.a03converStreamDemo1;

import java.io.*;

public class ConvertStreamDemo4 {
    public static void main(String[] args) throws IOException {

        FileInputStream fis = new FileInputStream("day27-code\\file\\demo1\\a.txt");
//        FileOutputStream fos = new FileOutputStream("day27-code\\file\\demo1\\b.txt");

//        int b;
//        while ((b=fis.read())!=-1){
//            System.out.print((char) b);
//        }
//        fis.close();
        //转换为字符输入流
        InputStreamReader isr = new InputStreamReader(fis, "GBK");
//        int ch;
//        while ((ch=isr.read())!=-1){
//            System.out.print((char) ch);
//        }
//        isr.close();
        BufferedReader br = new BufferedReader(isr);
        String s;
        while ((s = br.readLine()) != null) {
            System.out.println(s);
        }
        br.close();


    }
}
